home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1154 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: pwolf-mac.qualcomm.com!user
  2. From: pwolf@qualcomm.com (Paul I. Wolf )
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Problem in my INT 16H!!!
  5. Date: 11 Jan 1996 19:35:22 GMT
  6. Organization: Qualcomm, Inc.
  7. Message-ID: <pwolf-1101961135200001@pwolf-mac.qualcomm.com>
  8. References: <1996Jan11.112500.5877@opalo.etsiig.uniovi.es>
  9. NNTP-Posting-Host: pwolf-mac.qualcomm.com
  10.  
  11. In article <1996Jan11.112500.5877@opalo.etsiig.uniovi.es>,
  12. u1436956@soneto.etsiig.uniovi.es (FERNANDEZ CASTA#O ; JOSE IGNACIO) wrote:
  13.  
  14. >        WHAT IS THE PROBLEM???
  15. [snip]
  16. > void interrupt far new_16h(__CPPARGS)
  17. > {
  18. [snip]
  19. >   asm {
  20. >     mov ax,_out
  21. >   }
  22. >   enable();
  23. > }
  24.  
  25. The return value must replace the saved ax on the stack, or you must
  26. return from the interrupt yourself in assembler and adjust the stack
  27. pointer. Interrupt routines in C cannot return any registers.
  28.  
  29. You can declare the interrupt routine as interrupt _far newint() and write
  30. the routine as Interrupt _far newing(stackstructure), where stackstruct
  31. represents the registers pushed on the stack by the interrupt. You can
  32. then change the structure members in C to change the values returned by
  33. the interrupt.
  34.